/**
 * 
 */
package com.vision.core.cm.serv.rpc;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.vision.core.cm.db.data.Company;
import com.vision.core.cm.db.data.Role;
import com.vision.core.cm.db.data.User;

/**
 * @author Mark
 *
 */
public interface UserServiceAsync extends AbstractServiceAsync<User> {  

	// Add other methods here not declared in AbstractServiceAsync
	
	void getProfile(AsyncCallback<User> callback);
	
	void getByUsername(String username, AsyncCallback<User> callback);
	
	void updateOwnProfile(User user, String oldPassword, AsyncCallback<User> callback);
	
	void assignCompanies(User user, List<Company> companies, AsyncCallback<List<Company>> callback);
	
	void unassignCompanies(User user, List<Company> companies, AsyncCallback<List<Company>> callback);

	void assignRoles(User user, List<Role> roles, AsyncCallback<List<Role>> callback);

	void unassignRoles(User user, List<Role> roles, AsyncCallback<List<Role>> callback);
	
	void activate(User user, AsyncCallback<User> callback);
	
	void deactivate(User user, AsyncCallback<User> callback);
	
}
